package com.tdkj.model.user;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * XnkyUserPhoto entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "xnky_user_photo")
public class BeanUserPhotoDetail extends BaseEntity{

	// Fields
	private BeanUserPhotos userPhotos;
	private String imgurl;
	private String state;
	private Timestamp createtime;

	// Constructors

	/** default constructor */
	public BeanUserPhotoDetail() {
	}

	/** minimal constructor */
	public BeanUserPhotoDetail(long id,BeanUserPhotos xnkyUserPhotos, Timestamp createtime) {
		this.setId(id);
		this.userPhotos = xnkyUserPhotos;
		this.createtime = createtime;
	}

	/** full constructor */
	public BeanUserPhotoDetail(long id,BeanUserPhotos userPhotos, String imgurl,
			String state, Timestamp createtime) {
		this.setId(id);
		this.userPhotos = userPhotos;
		this.imgurl = imgurl;
		this.state = state;
		this.createtime = createtime;
	}


	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "photosid", nullable = false)
	public BeanUserPhotos getUserPhotos() {
		return this.userPhotos;
	}

	public void setUserPhotos(BeanUserPhotos userPhotos) {
		this.userPhotos = userPhotos;
	}

	@Column(name = "imgurl", length = 40)
	public String getImgurl() {
		return this.imgurl;
	}

	public void setImgurl(String imgurl) {
		this.imgurl = imgurl;
	}

	@Column(name = "state", length = 40)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "createtime", nullable = false, length = 19)
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

}